home *** CD-ROM | disk | FTP | other *** search
/ 500 MB Nyheder Direkte fra Internet 9 / 500 MB nyheder direkte fra internet CD 9.iso / start / zipped / win / visbasic / playwavz.exe / FORM1.FRM < prev    next >
Text File  |  1995-12-02  |  3KB  |  123 lines

  1. VERSION 2.00
  2. Begin Form SimpleWAV 
  3.    Caption         =   "Simple WAV Player"
  4.    ClientHeight    =   1860
  5.    ClientLeft      =   1995
  6.    ClientTop       =   2625
  7.    ClientWidth     =   5145
  8.    Height          =   2550
  9.    Left            =   1935
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1860
  12.    ScaleWidth      =   5145
  13.    Top             =   1995
  14.    Width           =   5265
  15.    Begin CommandButton Command1 
  16.       Caption         =   "Play"
  17.       Enabled         =   0   'False
  18.       Height          =   495
  19.       Left            =   1320
  20.       TabIndex        =   0
  21.       Top             =   960
  22.       Width           =   2655
  23.    End
  24.    Begin CommonDialog CMDialog1 
  25.       DialogTitle     =   "Open / Play Wave File"
  26.       Filter          =   "WAV Files | *.wav"
  27.       Left            =   120
  28.       Top             =   1080
  29.    End
  30.    Begin Label lblFilename 
  31.       Caption         =   "No File Loaded"
  32.       FontBold        =   -1  'True
  33.       FontItalic      =   -1  'True
  34.       FontName        =   "MS Sans Serif"
  35.       FontSize        =   8.25
  36.       FontStrikethru  =   0   'False
  37.       FontUnderline   =   0   'False
  38.       Height          =   375
  39.       Left            =   120
  40.       TabIndex        =   1
  41.       Top             =   360
  42.       Width           =   4935
  43.    End
  44.    Begin Label Label3 
  45.       Caption         =   "Current File"
  46.       Height          =   255
  47.       Left            =   120
  48.       TabIndex        =   2
  49.       Top             =   120
  50.       Width           =   2655
  51.    End
  52.    Begin Menu File 
  53.       Caption         =   "File"
  54.       Begin Menu FileOpen 
  55.          Caption         =   "&Open"
  56.          Shortcut        =   ^O
  57.       End
  58.       Begin Menu separator 
  59.          Caption         =   "-"
  60.       End
  61.       Begin Menu Exit 
  62.          Caption         =   "E&xit"
  63.          Shortcut        =   ^X
  64.       End
  65.    End
  66.    Begin Menu Help 
  67.       Caption         =   "Help"
  68.       Begin Menu Aboutmnu 
  69.          Caption         =   "About"
  70.       End
  71.    End
  72. End
  73.  
  74. Sub About_Click ()
  75.     
  76. End Sub
  77.  
  78. Sub Aboutmnu_Click ()
  79.     about.Show 1
  80. End Sub
  81.  
  82. Sub Command1_Click ()
  83.     wFlags% = SND_LOOP And SND_ASYNC
  84.  
  85.     Command1.Enabled = False
  86.     X% = sndPlaySound(lblFileName.Caption, wFlags%)
  87.     Command1.Enabled = True
  88.  
  89. End Sub
  90.  
  91. Sub Exit_Click ()
  92.     End
  93. End Sub
  94.  
  95. Sub FileOpen_Click ()
  96.  
  97.     'Call common dialog
  98.     CMDialog1.Filename = ""
  99.     CMDialog1.Action = DLG_FILE_OPEN
  100.         
  101.     'Put the file name on the form
  102.     lblFileName.Caption = CMDialog1.Filename
  103.     
  104.     'Turn off the Italics
  105.     lblFileName.FontItalic = False
  106.     
  107.     'Enable the Play command button
  108.     Command1.Enabled = True
  109.  
  110.     'Disable the Play command button if there is no file
  111.     If lblFileName.Caption = "" Then
  112.         Command1.Enabled = False
  113.         lblFileName.Caption = "No File Loaded"
  114.         lblFileName.FontItalic = True
  115.     End If
  116. End Sub
  117.  
  118. Sub Form_Load ()
  119.     CenterForm SimpleWAV
  120.  
  121. End Sub
  122.  
  123.